package com.selune.online.ordering.system.common.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * Created with IntelliJ IDEA.
 *
 * @author xiaoyp
 * @date 2020/3/21
 * <p>
 * Description:
 */
public class PasswordSaltUtils {
	
	private static final String ALGORITHM_NAME = "MD5";
	
	private static final int HASH_ITERATIONS = 1024;
	
	public static String salt(String password, ByteSource salt) {
		return new SimpleHash("MD5", password, salt, 1024).toHex();
	}
}
